package net.thxjj.sitermodel;

import java.math.BigInteger;
import java.util.UUID;

public class PrimaryKeyGeneratorTool {



    public static String ProductKeyGenerator(){

        String result = UUID.randomUUID().toString();

        return result.replace("-","");
    }


    public static String PIdGenerator(){
        String lUUID = String.format("%040d", new BigInteger(UUID.randomUUID().toString().replace("-", ""), 16));

        return "018" + lUUID.substring(0,8);
    }

    public static String pincodeGenerator(){
        String result = UUID.randomUUID().toString();

        return result.replace("-","").substring(0,12);
    }

    public static void  main (String[] args){
        String aaa = pincodeGenerator();
        System.out.println(aaa);
    }

}
